/*
 * Created: Author: Aléx Carvalho / Date: 6/mai/2015
 * 
 * Changed: $Author: ac280593@gmail.com $ / $Date: 2015-06-11 04:28:43 +0000 (Thu, 11 Jun 2015) $
 */
package com.cpm.jobs;

import com.cpm.entities.Competence;
import java.util.Properties;
import javax.batch.operations.JobOperator;
import javax.batch.runtime.BatchRuntime;

public class JobManager {

    public void jobCalculatePerformanceCompetence(Competence c) {
        JobOperator jobOperator = BatchRuntime.getJobOperator();

        Properties properties = new Properties();
        properties.setProperty("family", c.getFamily().getId().toString() );
        properties.setProperty("competencePeriod", c.getPeriod().toString() );
        properties.setProperty("indicatorId", c.getIndicator().getId().toString() );
 

        jobOperator.start("performance", properties);
//        Long executionId = jobOperator.start("performance", properties);
//        JobExecution jobExecution = jobOperator.getJobExecution(executionId);
    }
}
